gboolean need_sync;
gboolean leaving_dnd;
gboolean in_dnd;
- gint n_overflow_items_when_dnd_started;
GtkToolItem *highlight_tool_item;
gint max_homogeneous_pixels;
{
priv->in_dnd = FALSE;
priv->leaving_dnd = FALSE;
- priv->n_overflow_items_when_dnd_started = 0;
}
priv->idle_id = 0;
priv->is_sliding = FALSE;
priv->in_dnd = FALSE;
priv->leaving_dnd = FALSE;
- priv->n_overflow_items_when_dnd_started = 0;
if (priv->idle_id)
{
gint n_items;
gint needed_size;
GtkRequisition arrow_requisition;
- gint n_overflowed;
gboolean overflowing;
gboolean size_changed;
gdouble elapsed;
else
size = available_size;
- n_overflowed = 0;
-
/* calculate widths of items */
overflowing = FALSE;
for (list = priv->content, i = 0; list != NULL; list = list->next, ++i)
}
else
{
- ++n_overflowed;
overflowing = TRUE;
new_states[i] = OVERFLOWN;
}
/* expand expandable items */
- /* FIXME, there is a lot of status stuff (like n_overflowed_items_when_dnd_started)
- * that should be removed. The comment below is obsolete.
- */
-
- /* We don't expand when dnd causes items to overflow. Doing so would result in
- * weird jumps as items are overflowed and expandable items suddenly get lots of
- * extra space. On the other hand we can't disable expanding completely, because
- * that would cause a weird jump when dnd begins
+ /* We don't expand when there is an overflow menu, because that leads to
+ * weird jumps when items get moved to the overflow menu and the expanding
+ * items suddenly get a lot of extra space
*/
- if (!n_overflowed && !(priv->in_dnd && n_overflowed > priv->n_overflow_items_when_dnd_started))
+ if (!overflowing)
{
n_expand_items = 0;
for (i = 0, list = priv->content; list != NULL; list = list->next, ++i)
GTK_WIDGET (toolbar));
}
- if (!priv->in_dnd)
- {
- priv->n_overflow_items_when_dnd_started = 0;
- for (list = priv->content; list != NULL; list = list->next)
- {
- content = list->data;
- if (content->state == OVERFLOWN)
- priv->n_overflow_items_when_dnd_started++;
- }
- }
-
priv->in_dnd = TRUE;
priv->leaving_dnd = FALSE;